import { upload,get,uploadProgress } from '../utils/request.js'

/**
 * 上传图片
 */
export const uploadFileApi = (type, data) => {
	return upload(`/common/upload/${type}`, data)
}
export const uploadProgressApi = (type, data,progressUpdate) => {
	return uploadProgress(`/common/upload/${type}`, data,progressUpdate)
}
/**
 * 商家类型列表
 */
export const getBusinessTypeApi = () => {
	return get('/common/listBusinessType')
}

/**
 * 获取商家/商户行业类型
 */
export const getMerchantTypeApi = () => {
	return get('/hfMcc/listMcc')
}
// <!----------商家入驻相关接口-------------> 
/**
 * 公司类型列表
 */
export const listCompanyType = () => {
	return get('/common/listCompanyType')
	// return get('/common/listCompanyTypeEnum')
	
}
/**
 * 
证件有效期类型列表
 */
export const listCertValidityType = () => {
	return get('/common/listCertValidityType')
}
// 自然人证件类型列表
export const listCertType = () => {
	return get('/common/listCertType')
}
// 结算账户类型列表
export const listCardType = () => {
	return get('/common/listCardType')
}
// 银行编码列表
export const listBank = () => {
	return get('/common/listBank')
}
/**
 * 汇付图片类型：F07-营业执照，F03-法人身份证国徽面，F02-法人身份证人像面，F08-开户许可证，
*F13-结算卡/银行卡正面， F56-结算人/持卡人身份证国徽面，F55-结算人/持卡人身份证人像面，
*F22-线下经营-门头照，F24-线下经营-内景照，F105-线下经营-收银台，F15-授权委托书，F301-增值电信业务经营许可证
**/ 
export const hfUploadFileApi = (type, data) => {
	return upload(`/common/hfUpload/${type}`, data)
}
export const hfUploadFileProgressApi = (type, data,progressUpdate) => {
	return uploadProgress(`/common/hfUpload/${type}`, data,progressUpdate)
}
// // 获取省市列表所有数据
// export const listAllRegion = () => {
// 	return get('/regions/listAllRegion')
// }
// // 根据id获取省市列表数据
// export const listRegion = () => {
// 	return get('/regions/listRegion')
// }
// ----------------------------------------------------
/**
 * 搜索订单类型
 */
export const getOrderSelectTypeApi = () => {
	return get('/common/listOrderSelectType')
}

/**
 * 订单状态列表
 */
export const getOrderStateApi = () => {
	return get('/common/listOrderState')
}

/**
 * 子订单状态列表
 */
export const getSubOrderStateApi = () => {
	return get('/common/listSubOrderState')
}

/**
 * 根据id获取汇付的省市区列表数据
 */
export const getHfRegionsByIdApi = (id) => {
	return get(`/hfRegions/listById?id=${id}`)
}

/**
 * 根据id获取汇付的所属行业列表数据
 */
export const getHfMccById = (id) => {
	return get(`/hfMcc/listById?id=${id}`)
}

/**
 * 获取商家/商户行业类型
 */
export const getHfMccApi = () => {
	return get('/hfMcc/listMcc')
}
//弹窗-已弹窗调取 
export const savePopType = (popType,data) => {
	return get(`/popRecord/save/${popType}`,data)
}